<template>
  <div class="parent">
    <div>这里是父组件,子组件按钮?</div>
    <div>
      <span>显示</span> <select @change="showInfo" v-model="showCh4" style="width: 70px">
      <option :value="true" :key="1">是</option>
      <option :value="false" :key="2">否</option>
    </select>
    </div>
    <child4 v-show="showCh4" :fatherMethod="fatherMethod"></child4>
  </div>
</template>

<script>
  import child4 from './Children4'
  export default {
    components: {
      child4
    },
    data() {
      return {
        showCh4: false
      }
    },
    methods: {
      fatherMethod() {
        window.alert("test")
      },
      showInfo() {
        window.alert(this.showCh4)
      }
    }
  }

</script>
<style scoped>
</style>
